package com.yzp.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Description
 *
 * @className: TranTest2Service
 * @author: yanzhouping
 * @date: 2019/9/2 15:15
 */
@Component
public class TranTest2Service {
    Logger log = LoggerFactory.getLogger(TranTest2Service.class);

    /**
     * 发送提醒短信
     * @throws InterruptedException
     */
    @Async("taskExecutor")
    public void sendMessage1() throws InterruptedException {
        log.info("发送短信方法---- 1   执行开始");
        log.info("发送短信方法---- 1   执行结束");
    }

    /**
     * 发送提醒短信 2
     * @throws InterruptedException
     */
    @Async("taskExecutor")
    public void sendMessage2() throws InterruptedException {
        log.info("发送短信方法---- 2   执行开始");
        log.info("发送短信方法---- 2   执行结束");
    }
}
